Hypertext Transfer Protocol (HTTP) provides a simple application model for exchanging information between servers and clients. The most common approach uses HTTP for delivering web pages for presentation on a browser. A Web API (Application Programming Interface) is a defined set of HTTP request and response messages, typically expressed in JSON (JavaScript Object Notation) or XML (Extensible Markup Language). The idea of exposing resources as Web APIs that expose data and logic for programmatic consumption is gaining popularity. These APIs are exposed to a broad range of clients running on many different devices. Each of these clients often has different capabilities. HTTP is well suited for these scenarios because it allows different clients to receive different representations to meet the needs of each client. Additionally, there are many scalability and evolvability benefits to systems that directly leverage HTTP. As a result, Web APIs are an attractive choice for many systems being built today.
Typically HTTP messages are exchanged over the Internet using TCP/IP (Transmission Control Protocol/Internet Protocol) as the underlying transport protocol stack. However, HTTP is not inherently reliant on TCP/IP and can be used over any number of transport protocol stacks as long as the protocol semantics are honored. As HTTP continues to gain popularity and more and more components use HTTP to expose their functionality, being able to communicate not only across the Internet but also between components located within the same application domain is increasingly important.